int isPalindrome(char str[])
{
    int len = strlen(str);
    if (len == 0 || len == 1)    return 1;
    int l = 0, r = len - 1;
    while (l < r)
    {
        if (str[l] != str[r])    return 0;
        l++, r--;
    }
    return 1;
}